[HVM] Mov to/from CR8 must be gated on whether VLAPIC device is created.
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Sat, 30 Sep 2006 10:30:09 +0000 (11:30 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Sat, 30 Sep 2006 10:30:09 +0000 (11:30 +0100)
commit963edd2c4efb5a875b04fa6c3bacdca858fb6b01
treefc0fef1ce879523d6f3beac5ca648295d55bd011
parent137a9ce8c7e9166495bd8835c42fdd7dc291649b
[HVM] Mov to/from CR8 must be gated on whether VLAPIC device is created.

If APIC=0 in VMX configuration file, VLAPIC(v) in
mov_from_cr()/mov_to_cr() will be NULL, so calling
vlapic_get_reg()/vlapic_set_reg()/vlapic_update_ppr()
would crash Xen.

Original patch from Dexuan Cui <dexuan.cui@intel.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
xen/arch/x86/hvm/svm/svm.c
xen/arch/x86/hvm/vmx/vmx.c